﻿<UserControl x:Class="DACU.UserControls.Player.PlayerNavigation"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
			 xmlns:Player="clr-namespace:DACU.UserControls.Player" xmlns:Utils="clr-namespace:DACU.Tools" mc:Ignorable="d" 
             d:DesignHeight="75" d:DesignWidth="467">
    <Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition />
			<RowDefinition />
		</Grid.RowDefinitions>

		<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,3">
			<TextBlock Text="{Binding TrackArtist}" />
			<TextBlock Text=" - ">
				<TextBlock.Visibility>
					<MultiBinding Converter="{StaticResource ResourceKey=TrackToVisibility}">
						<Binding Path="TrackArtist" />
						<Binding Path="TrackTitle" />
					</MultiBinding>
				</TextBlock.Visibility>
			</TextBlock>
			<TextBlock Text="{Binding TrackTitle}" />
		</StackPanel>

		<Grid Grid.Row="1">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition />
				<ColumnDefinition Width="Auto" />
			</Grid.ColumnDefinitions>
			<TextBlock HorizontalAlignment="Center" Text="{Binding TrackPosition,Converter={StaticResource DoubleToTimeSpan}}" VerticalAlignment="Center" Margin="0,0,3,0" />
			<ProgressBar Name="pbDownload" x:FieldModifier="private" Grid.Column="1" />
			<Slider Name="sPosition" x:FieldModifier="private" Height="23" Thumb.DragStarted="sPosition_DragStarted" Thumb.DragCompleted="sPosition_DragCompleted" Utils:SliderTools.MoveToPointOnDrag="True" IsMoveToPointEnabled="True" Grid.Column="1" />
			<TextBlock Grid.Column="2" HorizontalAlignment="Center" Text="{Binding TrackLength,Converter={StaticResource DoubleToTimeSpan}}" VerticalAlignment="Center" Margin="3,0,0,0" />
		</Grid>

		<!--<DockPanel Grid.Row="1" Name="dockPanel1">-->
		<Grid Grid.Row="2">
			<Grid.RowDefinitions>
				<RowDefinition Height="26" />
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition />
			</Grid.ColumnDefinitions>
			<Button Name="bPlayPause" x:FieldModifier="private" Grid.Column="0" Click="bPlayPause_Click" Padding="0">
				<Image Name="iPlayPause" x:FieldModifier="private" Source="/DACU;component/icons/Play.png" />
			</Button>
			<Button Name="bStop" x:FieldModifier="private" Grid.Column="1" Click="bStop_Click" Padding="0">
				<Image Source="/DACU;component/icons/Stop.png" />
			</Button>
			<Button Name="bPrev" x:FieldModifier="private" Grid.Column="2" Click="bPrev_Click" Padding="0">
				<Image Source="/DACU;component/icons/Prev.png" />
			</Button>
			<Button Name="bNext" x:FieldModifier="private" Grid.Column="3" Click="bNext_Click" Padding="0">
				<Image Source="/DACU;component/icons/Next.png" />
			</Button>
			<Player:VolumePopup x:Name="VolumePopup1" x:FieldModifier="private" Grid.Column="4" VolumeChanged="VolumePopup_VolumeChanged" />
		</Grid>
		<!--</DockPanel>-->
	</Grid>
</UserControl>
